package sun.springboot.quartz_scheduler_integrate.core.model;


import org.quartz.TriggerKey;

/**
 * 任务调度描述对象
 */
public class TriggerConf {

    /**
     * 触发器名称、触发器分组、时间表达式、附带业务数据
     */
    private String name, group, cronExpression;


    /**
     * 生成触发器key
     */
    public TriggerKey getKey() {
        return TriggerKey.triggerKey(this.name, this.group);
    }

    public TriggerConf(String name, String group) {
        this.name = name;
        this.group = group;
    }

    public TriggerConf(String name, String group, String cronExpression) {
        this.name = name;
        this.group = group;
        this.cronExpression = cronExpression;
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getGroup() {
        return group;
    }

    public void setGroup(String group) {
        this.group = group;
    }

    public String getCronExpression() {
        return cronExpression;
    }

    public void setCronExpression(String cronExpression) {
        this.cronExpression = cronExpression;
    }

}
